package com.otaku.crawler.util;

import java.util.Date;
import java.util.regex.Pattern;

public class Constants {
	public static final String AND_REPLACE = "!AND!";
	
	public final static Pattern FILTERS = Pattern
	.compile(".*(\\.(css|js|bmp|gif|jpe?g"
			+ "|png|tiff?|mid|mp2|mp3|mp4"
			+ "|wav|avi|mov|mpeg|ram|m4v|pdf"
			+ "|rm|smil|wmv|swf|wma|zip|rar|gz))$");
	
	public static final String NUM_REGIX = "[0-9]+";
	
	private static long todayTime=0;
	
	public static long getTodayTime(){
		long t = new Date().getTime();
		if(t%86400 == 0){
			todayTime=t;
			return todayTime;
		}else if(t-todayTime>86400){
			todayTime=t-t%86400;
			return todayTime;
		}else
			return todayTime;
			
	}
}
